package com.shioirikukuri.service.impl;

import com.shioirikukuri.entity.DiningOrder;
import com.shioirikukuri.mapper.DiningOrderMapper;
import com.shioirikukuri.service.IDiningOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DiningOrderServiceImpl implements IDiningOrderService {

	@Autowired
	private DiningOrderMapper diningOrderMapper;

	@Override
	public List<DiningOrder> getAllDiningOrders() {
		return diningOrderMapper.selectAllDiningOrders();
	}

	@Override
	public DiningOrder getDiningOrderById(Integer diningOrderId) {
		return diningOrderMapper.selectDiningOrderById(diningOrderId);
	}

	@Override
	public void createDiningOrder(DiningOrder diningOrder) {
		diningOrderMapper.insertDiningOrder(diningOrder);
	}

	@Override
	public void updateDiningOrder(DiningOrder diningOrder) {
		diningOrderMapper.updateDiningOrder(diningOrder);
	}

	@Override
	public void deleteDiningOrderById(Integer diningOrderId) {
		diningOrderMapper.deleteDiningOrderById(diningOrderId);
	}
}